﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;
using BEX.Core.Exchange.BTCE.BTCEResponseJsonTypes;

namespace BEX.Core.Exchange.BTCE
{
    public class BTCEResponse
    {
        public BTCEResponse(string json)
            : this(JObject.Parse(json))
        {
        }

        private JObject __jobject;
        public BTCEResponse(JObject obj)
        {
            this.__jobject = obj;
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Ticker _ticker;
        public Ticker ticker
        {
            get
            {
                if (_ticker == null)
                {
                    _ticker = JsonClassHelper.ReadStronglyTypedObject<Ticker>(JsonClassHelper.GetJToken<JObject>(__jobject, "ticker"));
                }
                return _ticker;
            }
        }
    }
}
